<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body th:fragment="answers_title">
    <div class="main-tab">
        <div class="max-width">

            <ul class="main-tab-ul" th:if="${toothType} lt 10">

                <li th:class="${toothType == -1}?'main-tab-active':''">
                    <a href="/answers/main/-1/0" target="_self">今日热门</a>
                </li>

                <li th:each="title,iterStat:${listTitle}" th:if="${iterStat.index} lt 10" th:class="${toothType == iterStat.index}?'main-tab-active'" >
                    <a th:href="@{'/answers/main/'+${iterStat.index}+'/'+${title.getTid()}}" target="_self">[[${title.getTname()}]]</a>
                </li>


                <li class="tab-more-list">
                    <a href="javascript:;" target="_self">
                        <span>更多</span>
                        <img class="arrow-bottom" src="/icon/arrow-bttom.png" alt="有贝口腔网">
                    </a>
                    <div>
                        <ul>
                            <li th:each="title,iterStat:${listTitle}" th:if="${iterStat.index} ge 10" >
                                <a th:href="@{'/answers/main/'+${iterStat.index}+'/'+${title.getTid()}}" target="_self">[[${title.getTname()}]]</a>
                            </li>
                        </ul>
                    </div>
                </li>
            </ul>

            <ul class="main-tab-ul" th:if="${toothType} ge 10">

                <li th:class="${toothType == -1}?'main-tab-active':''">
                    <a href="/answers/main/-1/0" target="_self">今日热门</a>
                </li>

                <li th:each="title,iterStat:${listTitle}" th:if="${iterStat.index < 9 || title.getTid() == tid}" th:class="${title.getTid() == tid}?'main-tab-active'" >
                    <a th:href="@{'/answers/main/'+${iterStat.index}+'/'+${title.getTid()}}" target="_self">[[${title.getTname()}]]</a>
                </li>


                <li class="tab-more-list">
                    <a href="javascript:;" target="_self">
                        <span>更多</span>
                        <img class="arrow-bottom" src="/icon/arrow-bttom.png" alt="有贝口腔网">
                    </a>
                    <div>
                        <ul>
                            <li th:each="title,iterStat:${listTitle}" th:if="${iterStat.index >= 9 && title.getTid() != tid}" >
                                <a th:href="@{'/answers/main/'+${iterStat.index}+'/'+${title.getTid()}}" target="_self">[[${title.getTname()}]]</a>
                            </li>
                        </ul>
                    </div>
                </li>
            </ul>

        </div>
    </div>
</body>
</html>